<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="${pageContext.request.contextPath }/webjars/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/listTable.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/editTablestyles.css">
</head>
<body>
<form action="books.action?methodName=doUpdateBooks" method="post">
	<table class="querytable">
		<tr>
			<th class="textright">图书种类：</th>
			<td class="textleft">
				<select name="typeid" >
					<option value="0">--请选择--</option>
					<c:forEach items="${tlist }" var="type">
						<option value="${type.typeid }">${type.typename}</option>
					</c:forEach>
				</select>
			</td>
			<td id="resultTypeId"></td>
		</tr>
		<tr>
			<th class="textright">图书名称：</th>
			<td class="textleft">
				<input type="text" name="bookname" id="bookname" value="${book.bookname }">
				<input type="hidden" name="bookid" id="bookid" value="${book.bookid}">
			</td>
			<td id="resultBookname"></td>
		</tr>
		<tr>
			<th class="textright">作者：</th>
			<td class="textleft">
				<input type="text" name="author" id="author" value="${book.author }">
			</td>
			<td id="resultAuthor"></td>
		</tr>
		<tr>
			<th class="textright">出版社：</th>
			<td class="textleft">
				<input type="text" name="publish" id="publish" value="${book.publish }">
			</td>
			<td id="resultPublish"></td>
		</tr>
		<tr>
			<th class="textright">图书简介：</th>
			<td class="textleft">
				<input type="text" name="lib" >
			</td>
			<td></td>
		</tr>
		<tr>
			<td colspan="3" align="center">
				<input type="submit" value="保存图书信息">
			</td>
		</tr>
	</table>
</form>
</body>
<script type="text/javascript">
	$(function() {
		$("select[name='typeid']").val("${book.typeid}");
	});

</script>
</html>